# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Josip Ponjavic <josipponjavic at gmail dot com>
# Contributor: Xu Fasheng <fasheng.xu[AT]gmail.com>

pkgname=deepin-calendar
pkgver=5.11.0
pkgrel=1
pkgdesc='Calendar for Deepin Desktop Environment'
arch=('loong64' 'x86_64')
url="https://github.com/linuxdeepin/dde-calendar"
license=('GPL3')
depends=('dtkcore' 'dtkgui' 'dtkwidget' 'glibc' 'gcc-libs' 'libical' 'qt5-svg' 'qt5-base')
makedepends=('cmake' 'ninja' 'qt5-tools')
groups=('deepin')
source=("https://github.com/linuxdeepin/dde-calendar/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('47fd7851d4e3fbbd3d27d31313394bce52abe03ae31ff2185e851d94bdc113038a7467c0d088947bc30d9a9ad246f3fc4fa24baeb43839fee0b9235ef9f73c36')

prepare() {
  cd dde-calendar-$pkgver
  sed -i '/DFrameworkdbus/d' */CMakeLists.txt */*/CMakeLists.txt
}

build() {
  cd dde-calendar-$pkgver
  cmake -GNinja . \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_SYSCONFDIR=/etc \
    -DCMAKE_INSTALL_LIBEXECDIR=lib \
    -DVERSION=$pkgver
  ninja
}

package() {
  cd dde-calendar-$pkgver
  DESTDIR="$pkgdir" ninja install
}
